let http = require('http')

let serve = http.createServer((req,res) => {
    res.setHeader('Content-type','text/html;charset=utf-8')
    if(req.url == '/favicon.icp'){
        return;
    }
    else if(req.url == '/index/index'|| req.url == '/'){
        res.end('首页');
    }
    else if(req.url == '/index/login'){
        res.end('登入')
    }
    else if(req.url = '/index/register'){
        res.end('注册')
    }
    else if(req.url == '/index/goodList'){
        res.end('产品列表')
    }
    else if(req.url == '/index/shoppingList'){
        res.end('购物车')
    }
}
)

serve.listen(3000,'www.zcl.com',()=>{
    console.log('服务器已建立，域名www.zcl.com已开启')
})